#include "stdio.h"

int main(int argc, char const *argv[]) {
  int day, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, sum = 0;
  scanf("%d", &day);
  int days[day];
  for (int i = 0; i < day; i++) {
    scanf("%d", &days[i]);
    if (days[i] >= 0 && days[i] <= 50) {
      a++;
    }
    else if (days[i] <= 100) {
      b++;
    }
    else if (days[i] <= 150) {
      c++;
    }
    else if (days[i] <= 200) {
      d++;
    }
    else if (days[i] <= 300) {
      e++;
    }
    else{
      f++;
    }
    sum += days[i];
  }
  printf("%.2f\n%d %d %d %d %d %d\n", 1.0*sum/day, a, b, c, d, e, f);

  return 0;
}
